package com.atguigu.springcloud.alibaba.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class ApplicationContextConfig {

    @Bean
    @LoadBalanced // 负载均衡，该注解类是为了找到哪个集群提供者(9001/9002),没有的话，不知道找哪个会报错
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }


}
